﻿using ConfExpert.Forms.Base;
using DevTeam;

using System;
using System.Data;

namespace ConfExpert.Forms.Depo.CycleCounting
{
    public partial class SayimTop : XForm
    {
        public SayimTop()
        {
            InitializeComponent();
        }

        private void SayimTop_Load(object sender, EventArgs e)
        {
            
            textEdit1.EditValueChanged += new EventHandler(textEdit1_EditValueChanged);

            DataSet ds = Session.DataManager.ExecuteDataSet("GetSayimTop", intParse(textEdit1.EditValue));
            gridView1.Init(ds.Tables[0]);
            gridView3.Init(ds.Tables[1]);

            //gridView3.MakeColumnVisible(gridView3.Columns["Tarih"]);
            //gridView3.Columns["Tarih"].DisplayFormat.FormatString = "g";
        }


        void textEdit1_EditValueChanged(object sender, EventArgs e)
        {
            gridView1.RefreshDataSource(true, "GetSayimTop", intParse(textEdit1.EditValue));
            gridView3.BestFitColumns();
        }
    }
}